
import 'Definition.dart';
import 'AlertModel.dart';
import 'GroupModel.dart';

class TodoModel extends Definition {
  
	String? content;
	String? title;
	String? username;
	int? user_id;
	int? collect_count;
	int? is_collect;
	int? group_id;
	int? id;
	int? alert_id;
	AlertModel? alert;
	GroupModel? group;

  @override
  Map<String, dynamic> toJson() {
    return {
			"content": content,
			"title": title,
			"username": username,
			"user_id": user_id,
			"collect_count": collect_count,
			"is_collect": is_collect,
			"group_id": group_id,
			"id": id,
			"alert_id": alert_id,
			"alert": alert?.toJson(),
			"group": group?.toJson(),
    };
  }

  @override
  void fromJson(Map<String, dynamic> json) {
		content = json["content"];
		title = json["title"];
		username = json["username"];
		user_id = json["user_id"];
		collect_count = json["collect_count"];
		is_collect = json["is_collect"];
		group_id = json["group_id"];
		id = json["id"];
		alert_id = json["alert_id"];
		alert = json["alert"] == null ? null : (AlertModel()..fromJson(json["alert"]));
		group = json["group"] == null ? null : (GroupModel()..fromJson(json["group"]));
  }
  
}
  